package com.kede.api.stand.controller.zhi;

import com.kede.api.stand.service.zhi.IZhiManageService;
import com.kede.pojo.ResHttp;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author:Pr.li
 * @Date: create in 2023/7/8 16:51
 */
@RequestMapping("zhi")
@RestController
public class ZhiIndexController {

    @Resource
    private IZhiManageService iZhiManageService;


    /**
     * 获取下一级分类 cateId为0时是顶级分类
     * @param cateId
     * @return
     */
    @GetMapping("getNextCateById")
    public ResHttp getNextCateById(Integer cateId,Integer isWeight){
        return iZhiManageService.getNextCateById(cateId,isWeight);
    }

    /**
     * 获取分类节点的生效条件
     * @param cateId
     * @return
     *
     *
     */
    @GetMapping("getCateInfoById")
    public ResHttp getCateInfoById(Integer cateId){
        return iZhiManageService.getCateInfoById(cateId);
    }


    @GetMapping("getZhiHotLit")
    public ResHttp getZhiHotLit(){
        return iZhiManageService.getZhiHotLit();
    }

}
